class Cat:
    name = "coco"
    tili = 10
    def __init__(self,name,tili):
        self.name = name
        self.tili = tili
    def play(self):
        self.tili -= 1
        print("%s在玩耍"%self.name)
        self.status()
    def sleep(self):
        self.tili += 1
        print("%s在呼呼呼~~~" % self.name)
        self.status()
    def status(self):
        print("%s现在的体力是%d" % (self.name, self.tili))
cat1 = Cat("coco",10)
cat1.sleep()    
cat1.play()
